package com.coffee.attachment.repository;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.coffee.attachment.entity.ExcelFieldEntity;
import com.coffee.attachment.repository.mapper.MochaExcelFieldMapper;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author: songkui
 * @since: 2023/4/20 14:20
 */
@Service
public class MochaExcelFieldRepository extends ServiceImpl<MochaExcelFieldMapper, ExcelFieldEntity> {

    public List<ExcelFieldEntity> findByExcelId(Integer excelId){
        LambdaQueryWrapper<ExcelFieldEntity> queryWrapper = Wrappers.lambdaQuery();
        queryWrapper.eq(ExcelFieldEntity::getExcelId, excelId);

        return list(queryWrapper);
    }
}
